summaryrefslogtreecommitdiffstats
path: root/src/Simulator/VanillaFluidSimulator.h
blob: 96ce8dc70770b55edbb4a0941d465b16b0e76486 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

// VanillaFluidSimulator.h





#pragma once

#include "FloodyFluidSimulator.h"





class cVanillaFluidSimulator:
	public cFloodyFluidSimulator
{
	using Super = cFloodyFluidSimulator;

public:

	cVanillaFluidSimulator(
		cWorld & a_World,
		BLOCKTYPE a_Fluid,
		BLOCKTYPE a_StationaryFluid,
		NIBBLETYPE a_Falloff,
		int a_TickDelay,
		int a_NumNeighborsForSource
	);

protected:
	// cFloodyFluidSimulator overrides:
	virtual void SpreadXZ(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE a_NewMeta) override;

	/** Recursively calculates the minimum number of blocks needed to descend a level. */
	int CalculateFlowCost(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ, Direction a_Dir, unsigned a_Iteration = 0);

} ;